<template>
  <div class="common-layout">
    <div class="layout-aside">
      <Aside />
    </div>
    <div class="layout-main">
      <div class="layout-header">
        <Header />
      </div>
      <div class="layout-component">
        <RouterView />
      </div>
      <div class="layout-footer">
        <Footer />
      </div>
    </div>
  </div>
</template>

<script setup>
import Aside from "@/components/Aside.vue";
import Header from "@/components/Header.vue";
import Footer from "@/components/Footer.vue";
</script>

<style lang="scss" scoped>
::v-deep {
  .el-header {
    padding: 0;
  }
}

.common-layout {
  width: 100%;
  height: 100%;
  display: flex;

  .layout-aside {
    height: 100%;
    background-color: #545c64;

    ::v-deep {
      .el-sub-menu__title {
        padding: 0;
      }

      .el-menu-item {
        padding: 0 20px !important;
      }
    }
  }

  .layout-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;

    .layout-header {
      height: 60px;
    }

    .layout-component {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
      height: calc(100% - 60px - 60px);
      box-sizing: border-box;
    }

    .layout-footer {
      height: 60px;
    }
  }
}
</style>
